﻿@model BaseballGame.Models.Player

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Player</legend>

        @Html.HiddenFor(model => model.Id)

        <div class="editor-label">
            @Html.LabelFor(model => model.player_name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.player_name)
            @Html.ValidationMessageFor(model => model.player_name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.positionId, "position")
        </div>
        <div class="editor-field">
            @Html.DropDownList("positionId", String.Empty)
            @Html.ValidationMessageFor(model => model.positionId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.speed)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.speed)
            @Html.ValidationMessageFor(model => model.speed)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.power)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.power)
            @Html.ValidationMessageFor(model => model.power)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.hitting_chance)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.hitting_chance)
            @Html.ValidationMessageFor(model => model.hitting_chance)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.at_bat)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.at_bat)
            @Html.ValidationMessageFor(model => model.at_bat)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.runs)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.runs)
            @Html.ValidationMessageFor(model => model.runs)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.hits)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.hits)
            @Html.ValidationMessageFor(model => model.hits)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.runs_batted_in)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.runs_batted_in)
            @Html.ValidationMessageFor(model => model.runs_batted_in)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.home_runs)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.home_runs)
            @Html.ValidationMessageFor(model => model.home_runs)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.balls_on_balls)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.balls_on_balls)
            @Html.ValidationMessageFor(model => model.balls_on_balls)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.strike_outs)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.strike_outs)
            @Html.ValidationMessageFor(model => model.strike_outs)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.stolen_bases)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.stolen_bases)
            @Html.ValidationMessageFor(model => model.stolen_bases)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.left_on_base)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.left_on_base)
            @Html.ValidationMessageFor(model => model.left_on_base)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.fielding)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.fielding)
            @Html.ValidationMessageFor(model => model.fielding)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.batting_avg)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.batting_avg)
            @Html.ValidationMessageFor(model => model.batting_avg)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.pitching)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.pitching)
            @Html.ValidationMessageFor(model => model.pitching)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.innings_pitched)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.innings_pitched)
            @Html.ValidationMessageFor(model => model.innings_pitched)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.runs_allowed)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.runs_allowed)
            @Html.ValidationMessageFor(model => model.runs_allowed)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.earned_runs_allowed)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.earned_runs_allowed)
            @Html.ValidationMessageFor(model => model.earned_runs_allowed)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.home_runs_allowed)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.home_runs_allowed)
            @Html.ValidationMessageFor(model => model.home_runs_allowed)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.walks_hit_by_ip)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.walks_hit_by_ip)
            @Html.ValidationMessageFor(model => model.walks_hit_by_ip)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.earned_runs_average)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.earned_runs_average)
            @Html.ValidationMessageFor(model => model.earned_runs_average)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
